<?php

/*
 * This page is displayed when an email failed to verify
 * either because the request has been cancelled or becuase it has already been verified
 * Called fron users.php
 * function emailvalid($key)
 * Written By Anton Foster 
 * March 2013
 */
echo '<div id="contentfull">';
echo '<div id="forms">';
echo '<a href="'.$baseurl.'"><img src="'.$baseurl.'public/images/close.png" align="right" alt="close" title="Close" border="0" /></a>';
switch ($type) {
    case 'noreg':
        shownoreg();

        break;
    case 'yesreg':
        if ($emailvrified == TRUE && $status != 'cancel') {
            showregdone($Name, $username);
        } else {
            showregcan();
        }

        break;
    default:
        break;
}

echo '</div> <!-- contentfull -->';
echo '</div> <!-- forms -->';



function shownoreg() {
    echo '<h2> Sorry there is no registration for this available</h2><br /> 
        this could be for one of a number of reasons
    <ul>
        <li>The registration has been cancelled by the email owner</li>
        <li>The email address has already been verified and membership either Granted or Declined (this may take a day or two to communicate so keep an eye on your email</li>
    </ul>        
    <br />
    <br />
    Thank you <br />
    <br />
    The Forum Team
    ';
}

function showregdone($Name, $username) {
    echo '<h2> '.$Name.' This email ('.$username.') has already been validated </h2><br /> 
        <p>
        The Registration is now in its final moderation stage and we will be contacting you shortly<br />
        Please keep an eye out for our email 
    </p>
              
    <br />
    <br />
    Thank you <br />
    <br />
    The Forum Team
    ';
}

function showregcan() {
    echo '<h2> '.$name.' This regiustration has been Cancelled </h2><br /> 
        <p>
        The Registration has been cancelled by the email owner <br />
         
    </p>
              
    <br />
    <br />
    Thank you <br />
    <br />
    The Forum Team
    ';
}

    ?>
    
